// ksun48
#include <bits/stdc++.h>
using namespace std;

using ll = int64_t;

int main(){
	ios_base::sync_with_stdio(false), cin.tie(nullptr);
	int N;
	cin >> N;
	vector<int> X(N), Y(N);
	for(int i = 0; i < N; i++){
		cin >> X[i] >> Y[i];
	}
	ll ans = 0;
	map<pair<int,int>, ll> midpts;

	for(int i = 0; i < N; i++){
		for(int j = 0; j < i; j++){
			midpts[{X[i] + X[j], Y[i] + Y[j]}] += 1;
		}
	}
	for(auto [x, f] : midpts){
		ans -= ll(f) * (f-1) / 2;
	}
	map<pair<int,int>, ll> slopes;
	for(int i = 0; i < N; i++){
		for(int j = 0; j < i; j++){
			int x = X[i]-X[j];
			int y = Y[i]-Y[j];
			int g = gcd(x, y);
			x /= g; y /= g;
			if(pair<int,int>{x, y} < pair<int,int>{0, 0}){
				x = -x; y = -y;
			}
			slopes[{x, y}] += 1;
		}
	}
	for(auto [x, f] : slopes){
		ans += ll(f) * (f-1) / 2;
	}
	cout << ans << '\n';
}
